<template>
  <div>
    <el-dialog
      title="调度信息跟踪"
      :visible.sync="dialog"
      width="420px"
      :modal="false"
      @close="handleClose"
    >
      <div>
        <el-timeline>
          <el-timeline-item
            v-for="(activity, index) in activitiesData"
            :key="index"
            :timestamp="formatTimes(activity.operateTime,'YYYY/MM/DD hh:mm:ss')"
          >
            {{ `${ activity.operateName} - ${activity.remark}` }}
          </el-timeline-item>
        </el-timeline>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { formatTimes } from '@/utils'
export default {
  props: {
    trackDialog: {
      type: Boolean,
      default: false
    },
    activitiesData: {
      type: Array,
      default: () => { [] }
    }
  },
  data() {
    return {
      formatTimes,
      dialog: this.trackDialog
    }
  },
  methods: {
    handleClose() {
      this.$emit('closeDialog')
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
